<?php
    defined('BASEPATH') OR exit('No direct script access allowed'); 
?><head>
     <title><?php echo $title; ?></title>
   <?php $this->load->module('admin/index/page_header');?>
</head>

<div class="nav">
    <ul>
        <li class="current">
            <a  href="<?php echo site_url('weixin/actioninfo')?>">活动预览</a>
        </li>
         <li>
            <a href="<?php echo site_url('weixin/actioninfo/add_view')?>" >添加活动</a>
        </li>
    </ul>
</div>
<form runat="server" name="example" method="post" action="<?php echo $index_url; ?>" >
<table style="width:100%;">
<tr style="line-height:30px; font-weight:bold">
<td>标题</td>
<td>关键词</td>
<td>内容</td>
<td>开始时间</td>
<td>结束时间</td>
<td>活动类型</td>
<td>抽奖次数</td>
<td>添加人</td>
<td>状态</td>
<td>操作</td>
</tr>
<?php
foreach ($list as $items){?>
	<tr style="height:35px;">
		<td><?php echo $items->aname; ?></td>
		<td><?php echo $items->aword; ?></td>
		<td>
            <!-- <a href="#" title="<?php echo htmlspecialchars($items->acont);?>">内容预览</a> -->
            <?php if($items->activtype==1){ ?>
                <a target="_blank" href="<?php echo site_url('/special/actioninfo_activity/index/'.$items->aid); ?>">内容预览</a>
            <?php }if($items->activtype==2){ ?>
                <a target="_blank" href="<?php echo site_url('/special/actioninfo_lucky/index/'.$items->aid); ?>">内容预览</a>
            <?php } ?>

        </td>
		<td><?php echo $items->abeginTime; ?></td>
		<td><?php echo $items->aendTime; ?></td>
		<td><?php if($items->activtype==1) echo "刮刮卡"; elseif ($items->activtype==2) echo "大转盘"; else echo '系统无法找到'; ?></td>
		<td><?php echo $items->atimes; ?></td>
		<td><?php echo $items->addid; ?></td>
        <td>
		<?php if($items->isuse){ 
			echo "已启用 <a title='点击禁用' href='".site_url("/weixin/actioninfo/no_uses/".$items->aid)."'>禁用</a>";
		}else{
            echo "已禁用 <a title='点击启用' href='".site_url("/weixin/actioninfo/is_uses/".$items->aid)."'>启用</a>";
		} ?></td>
        <td>
        <?php if($items->activtype==1){ ?>
        	<a target="_blank" href="<?php echo site_url('/special/actioninfo_activity/index/'.$items->aid); ?>">预览</a>
		<?php }if($items->activtype==2){ ?>
			<a target="_blank" href="<?php echo site_url('/special/actioninfo_lucky/index/'.$items->aid); ?>">预览</a>
        <?php } ?>
        <a href="<?php echo site_url('/weixin/actioninfo/show_edit/'.$items->aid); ?>">编辑</a>
        <a href="<?php echo site_url('/weixin/actioninfo/active_del/'.$items->aid); ?>">删除</a>
        </td>
	</tr>
<?php } ?>
</table>
<br />
<p align="center">
    <?php echo $pagelists; ?>
</p>
</form>
</html>